package cn.wolfcode.util;

import cn.wolfcode.domain.Employee;
import org.apache.shiro.SecurityUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpSession;
import java.util.List;

public class UserContext {

    /**
     * 从shiro中获取当前登录用户
     * @return
     */
    public static Employee getCurrentUser(){

        return (Employee) SecurityUtils.getSubject().getPrincipal();
    }

}
